import Vue from 'vue'
import App from './App.vue'
import router from './router'
import 'vant/lib/index.css';
import MetaInfo from 'vue-meta-info'
Vue.use(MetaInfo)

const vp = Vue.prototype;

import TOOL from './assets/js/tool.js'
import CONF from './assets/js/config.js'
vp.$CONF = CONF
vp.$TOOL = TOOL

import axios from "axios";
axios.defaults.withCredentials = true;
vp.$http = axios;

// vp.$http2 = axios;// 解决跨域的axios
// vp.$http2.defaults.baseURL = '/api'

import {Toast} from 'vant';
Vue.use(Toast)
vp.$toast = Toast;
vp.$toast.setDefaultOptions({ duration: 2000,forbidClick: true });

Vue.config.productionTip = false
new Vue({
  router,
  render: h => h(App)
}).$mount('#app')

